package com.sg.fileService.util;

import com.sg.fileService.config.Property;

/**
 * 多媒体文件工具类（视频，图片）
 * @author asus
 *
 */
public class MultFileSizeUtil {
	/**
	 * 根据文件类型获取文件尺寸
	 * @param fileSizeType
	 * @return
	 */
	public MultFileSizeUtil.FileSize getImgSizeByFileType(String fileSizeType){
		MultFileSizeUtil.FileSize  fileSize = new MultFileSizeUtil.FileSize();
		if(Property.LAST_PATH_L.equals(fileSizeType)) {
			fileSize.setHeight(Property.IMG_BIG_HEIGHT);
			fileSize.setWidth(Property.IMG_BIG_WIDTH);
		}else if(Property.LAST_PATH_M.equals(fileSizeType)) {
			fileSize.setHeight(Property.IMG_MIDDLE_HEIGHT);
			fileSize.setWidth(Property.IMG_MIDDLE_WIDTH);
		}else if(Property.LAST_PATH_T.equals(fileSizeType)) {
			fileSize.setHeight(Property.IMG_BREVIARY_HEIGHT);
			fileSize.setWidth(Property.IMG_BREVIARY_WIDTH);
		}else if(Property.LAST_PATH_S.equals(fileSizeType)) {
			fileSize.setHeight(Property.IMG_SMALL_HEIGHT);
			fileSize.setWidth(Property.IMG_SMALL_WIDTH);
		}
		return fileSize;
	}
	public class FileSize{
		//文件高
		private int height;
		//文件宽
		private int width;
		public int getHeight() {
			return height;
		}
		public void setHeight(int height) {
			this.height = height;
		}
		public int getWidth() {
			return width;
		}
		public void setWidth(int width) {
			this.width = width;
		}
		
	}
}	
